using System.Xml.Serialization;
using LinqToDB;
using LinqToDB.Mapping;
using NalogGarLoader.Data.Tables.GarEntries;

namespace NalogGarLoader.Data.Tables.GarEntries.AddressTables;

#nullable disable

[XmlRoot("OBJECT")]
[Table(GarTypes.AS_REESTR_OBJECTS)]
public class ReestrObject : GarAddressTableEntryBase
{
    [XmlAttribute("OBJECTID")]
    [Column]
    [PrimaryKey]
    public long ObjectId { get; set; }

    [XmlAttribute("OBJECTGUID")]
    [Column]
    public Guid ObjectGuid{ get; set; }      

    [XmlAttribute("CHANGEID")]
    [Column]
    public long ChangeId { get; set; }         

    [XmlAttribute("LEVELID")]
    [Column (DataType = DataType.NVarChar, Length = 4)]
    public string LevelId { get; set; }                           

    [XmlAttribute(AttributeName = "UPDATEDATE", DataType = "date")]
    [Column(DataType = DataType.Date)]
    public DateTime UpdateDate { get; set; }

    [XmlAttribute(AttributeName = "CREATEDATE", DataType = "date")]
    [Column(DataType = DataType.Date)]
    public DateTime CreatedDate { get; set; }      
}